<?php
$batchCount = 1;
$batchdetails = classes::getClassBatch($model->id, $venueArrayVal);
foreach ($batchdetails as $batchValue) {
    /* ............................ Here is batch details start................................ */
    ?>
    <div class="tab-panes showBatchDetails" id="home<?php echo $venueArrayVal; ?>">
        <div class="venue-detail">
            <div class="detail-start">
                <h4>Batch details-<?php echo $batchCount; ?></h4><span><?php if ($model->class_type_id == CURATED_CLASS_TYPE) { ?><a href="javascript:void(0);" onclick="return BookNow(<?php echo $venueArrayVal; ?>,<?php echo $batchValue->id; ?>)">Book now</a><?php } ?></span>
            </div>  
            <table class="batch-detail">
                <tr>
                    <th>Start date</th>
                    <th>Start time</th>
                    <th>End time</th>
                    <th>Price</th>
                </tr>
                <tr>
                    <td><?php echo $batchValue->start_date; ?></td>
                    <td><?php echo $batchValue->start_time; ?></td>
                    <td><?php echo $batchValue->end_time; ?></td>
                    <td><?php echo $batchValue->price; ?></td>
                </tr>
            </table>
            <?php
            /* --------------------  batch  EarlyDiscount  details Start------------------------------------ */
            $classEarlyDiscount = classes::getClassBatchEarlyBirdDiscount($model->id, $batchValue->id);
            if (!empty($classEarlyDiscount)) {
                echo ' <h4>Early Discount</h4>';
                $this->renderPartial('/classEarlyDiscount/_classEarlyDiscount', array('classEarlyDiscount' => $classEarlyDiscount));
            }
            ?>
            <?php
            /* --------------------  Batch  GroupDiscount  details Start------------------------------------ */
            $classGroupDiscount = classes::getClassBatchGroupDscount($model->id, $batchValue['id']);
            if (!empty($classGroupDiscount)) {
                echo ' <h4>Group Discount</h4>';
                $this->renderPartial('/groupDiscount/_classGroupDiscount', array('classGroupDiscount' => $classGroupDiscount));
            }
            ?>

            <?php
            if ($batchValue->schedule_id == 4) {
                $customeSchedule = Classes::getCustomeSechedule($model->id, $batchValue->id);
                if (!empty($customeSchedule)) {
                    echo ' <h4>Other Schedules </h4>';
                    $this->renderPartial('/batcheSession/_classBatchSession', array('customeSchedule' => $customeSchedule, 'batchValue' => $batchValue));
                }
            }
            /* -------------------- Batch Schedule   details end------------------------------------ */
            /* -------------------- Batch ClassStructure   details end------------------------------------ */
            $classStructure = classes::getClassStructure($model->id, $batchValue->id);
            if (!empty($classStructure)) {
                echo ' <h4>Class Structure </h4>';
                $this->renderPartial('/classStructures/_classCourseStructureDetails', array('classStructure' => $classStructure));
            }
            ?>


        </div><!--venue-detail end-->
    </div>

    <?php
$batchCount++;}?>

